package top.dark.design.patterns.singleton;

/**
 * Author: Darkn
 * description: 饿汉式，静态代码块，能保证实例唯一，不能懒加载
 * Create Time: 2021/4/25 16:23
 */
public class Singleton02 {
    private static Singleton02 singleton = null;
    static {
        singleton = new Singleton02();
    }
    public static Singleton02 getInstance(){
        return singleton;
    }
}
